package com.red.basic.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.red.basic.mapper.RedGoodsFolderMapper;
import com.red.basic.domain.RedGoodsFolder;
import com.red.basic.service.IRedGoodsFolderService;

/**
 * 物资目录管理Service业务层处理
 * 
 * @author bug2222
 * @date 2024-11-15
 */
@Service
public class RedGoodsFolderServiceImpl implements IRedGoodsFolderService 
{
    @Autowired
    private RedGoodsFolderMapper redGoodsFolderMapper;

    /**
     * 查询物资目录管理
     * 
     * @param id 物资目录管理主键
     * @return 物资目录管理
     */
    @Override
    public RedGoodsFolder selectRedGoodsFolderById(Long id)
    {
        return redGoodsFolderMapper.selectRedGoodsFolderById(id);
    }

    /**
     * 查询物资目录管理列表
     * 
     * @param redGoodsFolder 物资目录管理
     * @return 物资目录管理
     */
    @Override
    public List<RedGoodsFolder> selectRedGoodsFolderList(RedGoodsFolder redGoodsFolder)
    {
        return redGoodsFolderMapper.selectRedGoodsFolderList(redGoodsFolder);
    }

    /**
     * 新增物资目录管理
     * 
     * @param redGoodsFolder 物资目录管理
     * @return 结果
     */
    @Override
    public int insertRedGoodsFolder(RedGoodsFolder redGoodsFolder)
    {
        return redGoodsFolderMapper.insertRedGoodsFolder(redGoodsFolder);
    }

    /**
     * 修改物资目录管理
     * 
     * @param redGoodsFolder 物资目录管理
     * @return 结果
     */
    @Override
    public int updateRedGoodsFolder(RedGoodsFolder redGoodsFolder)
    {
        return redGoodsFolderMapper.updateRedGoodsFolder(redGoodsFolder);
    }

    /**
     * 批量删除物资目录管理
     * 
     * @param ids 需要删除的物资目录管理主键
     * @return 结果
     */
    @Override
    public int deleteRedGoodsFolderByIds(Long[] ids)
    {
        return redGoodsFolderMapper.deleteRedGoodsFolderByIds(ids);
    }

    /**
     * 删除物资目录管理信息
     * 
     * @param id 物资目录管理主键
     * @return 结果
     */
    @Override
    public int deleteRedGoodsFolderById(Long id)
    {
        return redGoodsFolderMapper.deleteRedGoodsFolderById(id);
    }

    @Override
    public List<RedGoodsFolder> getRootFolder() {
        return redGoodsFolderMapper.getRootFolder();
    }
}
